home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5238 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  980 b 

  1. From: cmoore@msn.com (Carl  S. Moore)
  2. Subject: C++ 4.5 CanClose
  3. Date: 3 Feb 96 04:17:30 -0800
  4. Message-ID: <00001a81+000098f8@msn.com>
  5. Path: news.msn.com!msn.com
  6. Newsgroups: comp.lang.c++
  7. Organization: The Microsoft Network (msn.com)
  8.  
  9. I'd like some help here on a seemingly simple question....  After 
  10. upgrading to BC++ 4.5, I'm having some trouble with some things.   
  11. I'm relatively novice at this so bear with it.
  12.  
  13. I have the following, where a menu item calls Exitgame, and then it 
  14. brings up the CanClose box.  It doesn't seem to respond to the 
  15. CanClose through this menu exit, but the CanClose does work when I 
  16. terminate the window by clicking on the upper left corner etc. (ie, 
  17. doesn't route through Exitgame).
  18.  
  19. thanks,  carl
  20.  
  21.  
  22. void TMyWindow::Exitgame()
  23. {
  24.   TMyWindow::CanClose();
  25. }
  26.  
  27.  
  28. BOOL TMyWindow::CanClose()
  29.   {
  30.   return BWCCMessageBox(HWindow, "          GAMENAME              Are 
  31. you sure you want to Exit?",
  32.      "Exit?", MB_YESNO | MB_ICONQUESTION) == IDYES;
  33.  
  34.   }
  35.